from langchain_community.document_loaders import UnstructuredExcelLoader

class ChatDoc():

    def getFile():
        # 读取文件
        loader = UnstructuredExcelLoader("file/测试.xlsx", mode="elements")
        text = loader.load()
        return text


data = ChatDoc.getFile()
print(data)